//
//  LPWYHomeMustCellView.m
//  ZhongWangYuanApp
//
//  Created by liuyingping on 2018/6/5.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "LPWYHomeMustCellView.h"

@implementation LPWYHomeMustCellView
// 170
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.topImageView];
        [self addSubview:self.mustLabel];
        [self addSubview:self.optionalLabel];
        [self addSubview:self.applyLabel];
        
        self.topImageView.sd_layout
        .topSpaceToView(self, 10 * [UIScreen zj_screenHScale])
        .leftEqualToView(self)
        .rightEqualToView(self)
        .heightIs(110 * [UIScreen zj_screenHScale]);
        
        self.mustLabel.sd_layout
        .topSpaceToView(self.topImageView, 5 * [UIScreen zj_screenHScale])
        .leftEqualToView(self.topImageView)
        .widthIs(self.width * 0.47)
        .heightIs(15 * [UIScreen zj_screenHScale]);
        
        self.optionalLabel.sd_layout
        .topEqualToView(self.mustLabel)
        .rightEqualToView(self.topImageView)
        .widthIs(self.width * 0.47)
        .heightIs(15 * [UIScreen zj_screenHScale]);
        
        
        self.applyLabel.sd_layout
        .topSpaceToView(self.mustLabel, 5 * [UIScreen zj_screenHScale])
        .leftEqualToView(self)
        .rightEqualToView(self)
        .heightIs(10 * [UIScreen zj_screenHScale]);
        
        
    }
    return self;
}

- (UIImageView *)topImageView{
    if (!_topImageView) {
        _topImageView = [UIImageView new];
        
        
    }
    return _topImageView;
}


- (UILabel *)mustLabel{
    if (!_mustLabel) {
        _mustLabel = [UILabel new];
        _mustLabel.textColor = [UIColor textGrayColor];
        _mustLabel.font = LYPFONT(13);
        _mustLabel.textAlignment = NSTextAlignmentLeft;
        
    }
    return _mustLabel;
}


- (UILabel *)optionalLabel{
    if (!_optionalLabel) {
        _optionalLabel = [UILabel new];
        _optionalLabel.textColor = [UIColor textGrayColor];
        _optionalLabel.font = LYPFONT(13);
        _optionalLabel.textAlignment = NSTextAlignmentRight;
        
    }
    return _optionalLabel;
}

- (UILabel *)applyLabel{
    if (!_applyLabel) {
        _applyLabel = [UILabel new];
        _applyLabel.textColor = [UIColor lightGrayColor];
        _applyLabel.font = LYPFONT(12);
        
    }
    return _applyLabel;
}


@end
